]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Use replaceAll()
authorAlessandro Bono <alessandro.bono369@gmail.com>
Fri, 20 Feb 2026 22:57:14 +0000 (23:57 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 14 Mar 2026 17:38:55 +0000 (18:38 +0100)
The replace() function expects two parameters, likely the third one
was ignored. Use replaceAll() to replace all the occurrences, not
just the first one.

Fixes: 007b6ca2e ("environment: Add convenience method for implicit animations")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4084>
(cherry picked from commit 10cd1a875ddaff97b0d2220d2ad7f650da8976df)

js/ui/environment.js

index 3ebe8e261a327eabf4677cdc57b19afdb5080d3d..f2dc69eef7832c6c342cca53920b9d92f478797f 100644 (file)
@@ -149,7 +149,7 @@ function _easeActor(actor, params) {
     const callback = _makeEaseCallback(params, cleanup);
 
     // cancel overwritten transitions
-    let animatedProps = Object.keys(params).map(p => p.replace('_', '-', 'g'));
+    let animatedProps = Object.keys(params).map(p => p.replaceAll('_', '-'));
     animatedProps.forEach(p => actor.remove_transition(p));
 
     if (easingDuration > 0 || !isReversed)